package com.lovo.order.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Component
public class SysConfig implements WebMvcConfigurer {
//    @Autowired
//    private  SysInterceptor sysInterceptor;
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(sysInterceptor)
//                .addPathPatterns("/order/**");
  //  }
@Bean
public ServerEndpointExporter serverEndpointExporter() {
    return new ServerEndpointExporter();
}


    public void addResourceHandlers(ResourceHandlerRegistry registry) {
     registry.addResourceHandler("/pages/**")
             .addResourceLocations("classpath:/pages/");
    }
}
